﻿using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace tingchechang.Models
{
    public class LoginDBContext : DbContext
    {
        public DbSet<Users> User { get; set; }
        public DbSet<Car> Car { get; set; }
        public DbSet<Port> Port { get; set; }
        public DbSet<Carport> Carport { get; set; }
        public LoginDBContext(DbContextOptions<LoginDBContext> options) : base(options)
        {

        }
    }
    [Table("user")]
    public class Users
    {
        public int Id{ get; set; }
        public string Userid { get; set; }
        public string Password{ get; set; }

    }
    [Table("car")]
    public class Car
    {
        public int Id { get; set; }
        public string Carid { get; set; }
        public string Color { get; set; }
        public DateTime Timein { get; set; }
        public DateTime Timeout { get; set; }
        
        public float Fei { get; set; }
    }
    [Table("carport")]
    public class Carport
    {
        public int Id { get; set; }
        public string Carid { get; set; }
        public string Color { get; set; }
        public string Portid { get; set; }
        public DateTime Timein { get; set; }
        public DateTime Timeout { get; set; }
        public float Fei { get; set; }
    }
    [Table("port")]
    public class Port
    {
        public int Id { get; set; }
        public string Portid { get; set; }
        public string Area { get; set; }
        public string Carid { get; set; }
        public DateTime Timein { get; set; }


    }
    
}
